/******************************************************************************
STRICTLY CONFIDENTIAL (!)
COPYRIGHT BY MAX AND JAN PEJS

File:	Auto.h
Date:	01.09.2012
Author:	Max Pejs
******************************************************************************/

#ifndef	AUTO_H
#define	AUTO_H

#include "typedef.h"
#include "Diagnostic.h"

class Auto
{
private:

	UInt8 gear;
	float vehicleSpeed;
	// UInt8 vehicleTemperature;
	// UInt8  fuelLevel;
	UInt16 engineSpeed;
	
	// Inputs
	UInt16 pedalBrake;
	UInt16 pedalAccel;
	

	/***** params *********/
	float Ta;			// Abtastzeit
	UInt16 T;			// Zeitkostante
	UInt8 saturation;

	float ak_1;
	float ek;

	UInt8 get_k_gear();

public:
	Auto();
	~Auto();

	// Inputs
	void UpdateSpeedDes(UInt8 value);
	void UpdateBrakeDes(UInt8 value);

	// step simulation
	void DRIVE(void);

	// outputs
	UInt16 GetEngineSpeed(void);
	UInt16 GetVehicleSpeed(void);
	UInt8 GetGear(void);

	// not implemented
	UInt8 GetFuel(void);	// NOT IMPLEMENTED
	UInt8 GetVehicleTemperature(void);	// NOT IMPLEMENTED
};

#endif // AUTO_H

